3.17.37 \(\int \frac {(a+b x)^2 \sqrt {e+f x}}{c+d x} \, dx\)

Optimal. Leaf size=138 \[ -\frac {2 (b c-a d)^2 \sqrt {d e-c f} \tanh ^{-1}\left (\frac {\sqrt {d} \sqrt {e+f x}}{\sqrt {d e-c f}}\right )}{d^{7/2}}+\frac {2 \sqrt {e+f x} (b c-a d)^2}{d^3}-\frac {2 b (e+f x)^{3/2} (-2 a d f+b c f+b d e)}{3 d^2 f^2}+\frac {2 b^2 (e+f x)^{5/2}}{5 d f^2} \]

________________________________________________________________________________________

Rubi [A]  time = 0.12, antiderivative size = 138, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {88, 50, 63, 208} \begin {gather*} -\frac {2 b (e+f x)^{3/2} (-2 a d f+b c f+b d e)}{3 d^2 f^2}+\frac {2 \sqrt {e+f x} (b c-a d)^2}{d^3}-\frac {2 (b c-a d)^2 \sqrt {d e-c f} \tanh ^{-1}\left (\frac {\sqrt {d} \sqrt {e+f x}}{\sqrt {d e-c f}}\right )}{d^{7/2}}+\frac {2 b^2 (e+f x)^{5/2}}{5 d f^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((a + b*x)^2*Sqrt[e + f*x])/(c + d*x),x]

[Out]

(2*(b*c - a*d)^2*Sqrt[e + f*x])/d^3 - (2*b*(b*d*e + b*c*f - 2*a*d*f)*(e + f*x)^(3/2))/(3*d^2*f^2) + (2*b^2*(e
+ f*x)^(5/2))/(5*d*f^2) - (2*(b*c - a*d)^2*Sqrt[d*e - c*f]*ArcTanh[(Sqrt[d]*Sqrt[e + f*x])/Sqrt[d*e - c*f]])/d
^(7/2)

Rule 50

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)*(c + d*x)^n)/(b*
(m + n + 1)), x] + Dist[(n*(b*c - a*d))/(b*(m + n + 1)), Int[(a + b*x)^m*(c + d*x)^(n - 1), x], x] /; FreeQ[{a
, b, c, d}, x] && NeQ[b*c - a*d, 0] && GtQ[n, 0] && NeQ[m + n + 1, 0] &&  !(IGtQ[m, 0] && ( !IntegerQ[n] || (G
tQ[m, 0] && LtQ[m - n, 0]))) &&  !ILtQ[m + n + 2, 0] && IntLinearQ[a, b, c, d, m, n, x]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 88

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandI
ntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] &&
(IntegerQ[p] || (GtQ[m, 0] && GeQ[n, -1]))

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rubi steps

\begin {align*} \int \frac {(a+b x)^2 \sqrt {e+f x}}{c+d x} \, dx &=\int \left (-\frac {b (b d e+b c f-2 a d f) \sqrt {e+f x}}{d^2 f}+\frac {(-b c+a d)^2 \sqrt {e+f x}}{d^2 (c+d x)}+\frac {b^2 (e+f x)^{3/2}}{d f}\right ) \, dx\\ &=-\frac {2 b (b d e+b c f-2 a d f) (e+f x)^{3/2}}{3 d^2 f^2}+\frac {2 b^2 (e+f x)^{5/2}}{5 d f^2}+\frac {(b c-a d)^2 \int \frac {\sqrt {e+f x}}{c+d x} \, dx}{d^2}\\ &=\frac {2 (b c-a d)^2 \sqrt {e+f x}}{d^3}-\frac {2 b (b d e+b c f-2 a d f) (e+f x)^{3/2}}{3 d^2 f^2}+\frac {2 b^2 (e+f x)^{5/2}}{5 d f^2}+\frac {\left ((b c-a d)^2 (d e-c f)\right ) \int \frac {1}{(c+d x) \sqrt {e+f x}} \, dx}{d^3}\\ &=\frac {2 (b c-a d)^2 \sqrt {e+f x}}{d^3}-\frac {2 b (b d e+b c f-2 a d f) (e+f x)^{3/2}}{3 d^2 f^2}+\frac {2 b^2 (e+f x)^{5/2}}{5 d f^2}+\frac {\left (2 (b c-a d)^2 (d e-c f)\right ) \operatorname {Subst}\left (\int \frac {1}{c-\frac {d e}{f}+\frac {d x^2}{f}} \, dx,x,\sqrt {e+f x}\right )}{d^3 f}\\ &=\frac {2 (b c-a d)^2 \sqrt {e+f x}}{d^3}-\frac {2 b (b d e+b c f-2 a d f) (e+f x)^{3/2}}{3 d^2 f^2}+\frac {2 b^2 (e+f x)^{5/2}}{5 d f^2}-\frac {2 (b c-a d)^2 \sqrt {d e-c f} \tanh ^{-1}\left (\frac {\sqrt {d} \sqrt {e+f x}}{\sqrt {d e-c f}}\right )}{d^{7/2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.15, size = 138, normalized size = 1.00 \begin {gather*} -\frac {2 (b c-a d)^2 \sqrt {d e-c f} \tanh ^{-1}\left (\frac {\sqrt {d} \sqrt {e+f x}}{\sqrt {d e-c f}}\right )}{d^{7/2}}+\frac {2 \sqrt {e+f x} (b c-a d)^2}{d^3}-\frac {2 b (e+f x)^{3/2} (-2 a d f+b c f+b d e)}{3 d^2 f^2}+\frac {2 b^2 (e+f x)^{5/2}}{5 d f^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((a + b*x)^2*Sqrt[e + f*x])/(c + d*x),x]

[Out]

(2*(b*c - a*d)^2*Sqrt[e + f*x])/d^3 - (2*b*(b*d*e + b*c*f - 2*a*d*f)*(e + f*x)^(3/2))/(3*d^2*f^2) + (2*b^2*(e
+ f*x)^(5/2))/(5*d*f^2) - (2*(b*c - a*d)^2*Sqrt[d*e - c*f]*ArcTanh[(Sqrt[d]*Sqrt[e + f*x])/Sqrt[d*e - c*f]])/d
^(7/2)

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.23, size = 174, normalized size = 1.26 \begin {gather*} \frac {2 \sqrt {e+f x} \left (15 a^2 d^2 f^2-30 a b c d f^2+10 a b d^2 f (e+f x)+15 b^2 c^2 f^2-5 b^2 c d f (e+f x)+3 b^2 d^2 (e+f x)^2-5 b^2 d^2 e (e+f x)\right )}{15 d^3 f^2}+\frac {2 (a d-b c)^2 \sqrt {c f-d e} \tan ^{-1}\left (\frac {\sqrt {d} \sqrt {e+f x} \sqrt {c f-d e}}{d e-c f}\right )}{d^{7/2}} \end {gather*}

Antiderivative was successfully verified.

[In]

IntegrateAlgebraic[((a + b*x)^2*Sqrt[e + f*x])/(c + d*x),x]

[Out]

(2*Sqrt[e + f*x]*(15*b^2*c^2*f^2 - 30*a*b*c*d*f^2 + 15*a^2*d^2*f^2 - 5*b^2*d^2*e*(e + f*x) - 5*b^2*c*d*f*(e +
f*x) + 10*a*b*d^2*f*(e + f*x) + 3*b^2*d^2*(e + f*x)^2))/(15*d^3*f^2) + (2*(-(b*c) + a*d)^2*Sqrt[-(d*e) + c*f]*
ArcTan[(Sqrt[d]*Sqrt[-(d*e) + c*f]*Sqrt[e + f*x])/(d*e - c*f)])/d^(7/2)

________________________________________________________________________________________

fricas [A]  time = 1.48, size = 402, normalized size = 2.91 \begin {gather*} \left [\frac {15 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} f^{2} \sqrt {\frac {d e - c f}{d}} \log \left (\frac {d f x + 2 \, d e - c f - 2 \, \sqrt {f x + e} d \sqrt {\frac {d e - c f}{d}}}{d x + c}\right ) + 2 \, {\left (3 \, b^{2} d^{2} f^{2} x^{2} - 2 \, b^{2} d^{2} e^{2} - 5 \, {\left (b^{2} c d - 2 \, a b d^{2}\right )} e f + 15 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} f^{2} + {\left (b^{2} d^{2} e f - 5 \, {\left (b^{2} c d - 2 \, a b d^{2}\right )} f^{2}\right )} x\right )} \sqrt {f x + e}}{15 \, d^{3} f^{2}}, -\frac {2 \, {\left (15 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} f^{2} \sqrt {-\frac {d e - c f}{d}} \arctan \left (-\frac {\sqrt {f x + e} d \sqrt {-\frac {d e - c f}{d}}}{d e - c f}\right ) - {\left (3 \, b^{2} d^{2} f^{2} x^{2} - 2 \, b^{2} d^{2} e^{2} - 5 \, {\left (b^{2} c d - 2 \, a b d^{2}\right )} e f + 15 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} f^{2} + {\left (b^{2} d^{2} e f - 5 \, {\left (b^{2} c d - 2 \, a b d^{2}\right )} f^{2}\right )} x\right )} \sqrt {f x + e}\right )}}{15 \, d^{3} f^{2}}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^2*(f*x+e)^(1/2)/(d*x+c),x, algorithm="fricas")

[Out]

[1/15*(15*(b^2*c^2 - 2*a*b*c*d + a^2*d^2)*f^2*sqrt((d*e - c*f)/d)*log((d*f*x + 2*d*e - c*f - 2*sqrt(f*x + e)*d
*sqrt((d*e - c*f)/d))/(d*x + c)) + 2*(3*b^2*d^2*f^2*x^2 - 2*b^2*d^2*e^2 - 5*(b^2*c*d - 2*a*b*d^2)*e*f + 15*(b^
2*c^2 - 2*a*b*c*d + a^2*d^2)*f^2 + (b^2*d^2*e*f - 5*(b^2*c*d - 2*a*b*d^2)*f^2)*x)*sqrt(f*x + e))/(d^3*f^2), -2
/15*(15*(b^2*c^2 - 2*a*b*c*d + a^2*d^2)*f^2*sqrt(-(d*e - c*f)/d)*arctan(-sqrt(f*x + e)*d*sqrt(-(d*e - c*f)/d)/
(d*e - c*f)) - (3*b^2*d^2*f^2*x^2 - 2*b^2*d^2*e^2 - 5*(b^2*c*d - 2*a*b*d^2)*e*f + 15*(b^2*c^2 - 2*a*b*c*d + a^
2*d^2)*f^2 + (b^2*d^2*e*f - 5*(b^2*c*d - 2*a*b*d^2)*f^2)*x)*sqrt(f*x + e))/(d^3*f^2)]

________________________________________________________________________________________

giac [B]  time = 1.27, size = 250, normalized size = 1.81 \begin {gather*} -\frac {2 \, {\left (b^{2} c^{3} f - 2 \, a b c^{2} d f + a^{2} c d^{2} f - b^{2} c^{2} d e + 2 \, a b c d^{2} e - a^{2} d^{3} e\right )} \arctan \left (\frac {\sqrt {f x + e} d}{\sqrt {c d f - d^{2} e}}\right )}{\sqrt {c d f - d^{2} e} d^{3}} + \frac {2 \, {\left (3 \, {\left (f x + e\right )}^{\frac {5}{2}} b^{2} d^{4} f^{8} - 5 \, {\left (f x + e\right )}^{\frac {3}{2}} b^{2} c d^{3} f^{9} + 10 \, {\left (f x + e\right )}^{\frac {3}{2}} a b d^{4} f^{9} + 15 \, \sqrt {f x + e} b^{2} c^{2} d^{2} f^{10} - 30 \, \sqrt {f x + e} a b c d^{3} f^{10} + 15 \, \sqrt {f x + e} a^{2} d^{4} f^{10} - 5 \, {\left (f x + e\right )}^{\frac {3}{2}} b^{2} d^{4} f^{8} e\right )}}{15 \, d^{5} f^{10}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^2*(f*x+e)^(1/2)/(d*x+c),x, algorithm="giac")

[Out]

-2*(b^2*c^3*f - 2*a*b*c^2*d*f + a^2*c*d^2*f - b^2*c^2*d*e + 2*a*b*c*d^2*e - a^2*d^3*e)*arctan(sqrt(f*x + e)*d/
sqrt(c*d*f - d^2*e))/(sqrt(c*d*f - d^2*e)*d^3) + 2/15*(3*(f*x + e)^(5/2)*b^2*d^4*f^8 - 5*(f*x + e)^(3/2)*b^2*c
*d^3*f^9 + 10*(f*x + e)^(3/2)*a*b*d^4*f^9 + 15*sqrt(f*x + e)*b^2*c^2*d^2*f^10 - 30*sqrt(f*x + e)*a*b*c*d^3*f^1
0 + 15*sqrt(f*x + e)*a^2*d^4*f^10 - 5*(f*x + e)^(3/2)*b^2*d^4*f^8*e)/(d^5*f^10)

________________________________________________________________________________________

maple [B]  time = 0.02, size = 387, normalized size = 2.80 \begin {gather*} -\frac {2 a^{2} c f \arctan \left (\frac {\sqrt {f x +e}\, d}{\sqrt {\left (c f -d e \right ) d}}\right )}{\sqrt {\left (c f -d e \right ) d}\, d}+\frac {2 a^{2} e \arctan \left (\frac {\sqrt {f x +e}\, d}{\sqrt {\left (c f -d e \right ) d}}\right )}{\sqrt {\left (c f -d e \right ) d}}+\frac {4 a b \,c^{2} f \arctan \left (\frac {\sqrt {f x +e}\, d}{\sqrt {\left (c f -d e \right ) d}}\right )}{\sqrt {\left (c f -d e \right ) d}\, d^{2}}-\frac {4 a b c e \arctan \left (\frac {\sqrt {f x +e}\, d}{\sqrt {\left (c f -d e \right ) d}}\right )}{\sqrt {\left (c f -d e \right ) d}\, d}-\frac {2 b^{2} c^{3} f \arctan \left (\frac {\sqrt {f x +e}\, d}{\sqrt {\left (c f -d e \right ) d}}\right )}{\sqrt {\left (c f -d e \right ) d}\, d^{3}}+\frac {2 b^{2} c^{2} e \arctan \left (\frac {\sqrt {f x +e}\, d}{\sqrt {\left (c f -d e \right ) d}}\right )}{\sqrt {\left (c f -d e \right ) d}\, d^{2}}+\frac {2 \sqrt {f x +e}\, a^{2}}{d}-\frac {4 \sqrt {f x +e}\, a b c}{d^{2}}+\frac {2 \sqrt {f x +e}\, b^{2} c^{2}}{d^{3}}+\frac {4 \left (f x +e \right )^{\frac {3}{2}} a b}{3 d f}-\frac {2 \left (f x +e \right )^{\frac {3}{2}} b^{2} c}{3 d^{2} f}-\frac {2 \left (f x +e \right )^{\frac {3}{2}} b^{2} e}{3 d \,f^{2}}+\frac {2 \left (f x +e \right )^{\frac {5}{2}} b^{2}}{5 d \,f^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((b*x+a)^2*(f*x+e)^(1/2)/(d*x+c),x)

[Out]

2/5*b^2*(f*x+e)^(5/2)/d/f^2+4/3/f/d*(f*x+e)^(3/2)*a*b-2/3/f/d^2*(f*x+e)^(3/2)*b^2*c-2/3/f^2/d*(f*x+e)^(3/2)*b^
2*e+2/d*a^2*(f*x+e)^(1/2)-4/d^2*a*b*c*(f*x+e)^(1/2)+2/d^3*b^2*c^2*(f*x+e)^(1/2)-2*f/d/((c*f-d*e)*d)^(1/2)*arct
an((f*x+e)^(1/2)/((c*f-d*e)*d)^(1/2)*d)*a^2*c+2/((c*f-d*e)*d)^(1/2)*arctan((f*x+e)^(1/2)/((c*f-d*e)*d)^(1/2)*d
)*a^2*e+4*f/d^2/((c*f-d*e)*d)^(1/2)*arctan((f*x+e)^(1/2)/((c*f-d*e)*d)^(1/2)*d)*a*b*c^2-4/d/((c*f-d*e)*d)^(1/2
)*arctan((f*x+e)^(1/2)/((c*f-d*e)*d)^(1/2)*d)*a*b*c*e-2*f/d^3/((c*f-d*e)*d)^(1/2)*arctan((f*x+e)^(1/2)/((c*f-d
*e)*d)^(1/2)*d)*b^2*c^3+2/d^2/((c*f-d*e)*d)^(1/2)*arctan((f*x+e)^(1/2)/((c*f-d*e)*d)^(1/2)*d)*b^2*c^2*e

________________________________________________________________________________________

maxima [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)^2*(f*x+e)^(1/2)/(d*x+c),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(c*f-d*e>0)', see `assume?` for
 more details)Is c*f-d*e positive or negative?

________________________________________________________________________________________

mupad [B]  time = 0.17, size = 281, normalized size = 2.04 \begin {gather*} \sqrt {e+f\,x}\,\left (\frac {2\,{\left (a\,f-b\,e\right )}^2}{d\,f^2}+\frac {\left (\frac {4\,b^2\,e-4\,a\,b\,f}{d\,f^2}+\frac {2\,b^2\,\left (c\,f^3-d\,e\,f^2\right )}{d^2\,f^4}\right )\,\left (c\,f^3-d\,e\,f^2\right )}{d\,f^2}\right )-{\left (e+f\,x\right )}^{3/2}\,\left (\frac {4\,b^2\,e-4\,a\,b\,f}{3\,d\,f^2}+\frac {2\,b^2\,\left (c\,f^3-d\,e\,f^2\right )}{3\,d^2\,f^4}\right )+\frac {2\,b^2\,{\left (e+f\,x\right )}^{5/2}}{5\,d\,f^2}+\frac {\mathrm {atan}\left (\frac {\sqrt {d}\,\sqrt {e+f\,x}\,{\left (a\,d-b\,c\right )}^2\,\sqrt {d\,e-c\,f}\,1{}\mathrm {i}}{-f\,a^2\,c\,d^2+e\,a^2\,d^3+2\,f\,a\,b\,c^2\,d-2\,e\,a\,b\,c\,d^2-f\,b^2\,c^3+e\,b^2\,c^2\,d}\right )\,{\left (a\,d-b\,c\right )}^2\,\sqrt {d\,e-c\,f}\,2{}\mathrm {i}}{d^{7/2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((e + f*x)^(1/2)*(a + b*x)^2)/(c + d*x),x)

[Out]

(e + f*x)^(1/2)*((2*(a*f - b*e)^2)/(d*f^2) + (((4*b^2*e - 4*a*b*f)/(d*f^2) + (2*b^2*(c*f^3 - d*e*f^2))/(d^2*f^
4))*(c*f^3 - d*e*f^2))/(d*f^2)) - (e + f*x)^(3/2)*((4*b^2*e - 4*a*b*f)/(3*d*f^2) + (2*b^2*(c*f^3 - d*e*f^2))/(
3*d^2*f^4)) + (2*b^2*(e + f*x)^(5/2))/(5*d*f^2) + (atan((d^(1/2)*(e + f*x)^(1/2)*(a*d - b*c)^2*(d*e - c*f)^(1/
2)*1i)/(a^2*d^3*e - b^2*c^3*f - a^2*c*d^2*f + b^2*c^2*d*e - 2*a*b*c*d^2*e + 2*a*b*c^2*d*f))*(a*d - b*c)^2*(d*e
 - c*f)^(1/2)*2i)/d^(7/2)

________________________________________________________________________________________

sympy [A]  time = 10.27, size = 155, normalized size = 1.12 \begin {gather*} \frac {2 \left (\frac {b^{2} \left (e + f x\right )^{\frac {5}{2}}}{5 d f} + \frac {\left (e + f x\right )^{\frac {3}{2}} \left (2 a b d f - b^{2} c f - b^{2} d e\right )}{3 d^{2} f} + \frac {\sqrt {e + f x} \left (a^{2} d^{2} f - 2 a b c d f + b^{2} c^{2} f\right )}{d^{3}} - \frac {f \left (a d - b c\right )^{2} \left (c f - d e\right ) \operatorname {atan}{\left (\frac {\sqrt {e + f x}}{\sqrt {\frac {c f - d e}{d}}} \right )}}{d^{4} \sqrt {\frac {c f - d e}{d}}}\right )}{f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((b*x+a)**2*(f*x+e)**(1/2)/(d*x+c),x)

[Out]

2*(b**2*(e + f*x)**(5/2)/(5*d*f) + (e + f*x)**(3/2)*(2*a*b*d*f - b**2*c*f - b**2*d*e)/(3*d**2*f) + sqrt(e + f*
x)*(a**2*d**2*f - 2*a*b*c*d*f + b**2*c**2*f)/d**3 - f*(a*d - b*c)**2*(c*f - d*e)*atan(sqrt(e + f*x)/sqrt((c*f
- d*e)/d))/(d**4*sqrt((c*f - d*e)/d)))/f

________________________________________________________________________________________